ref, don't unref, requestor member when copying GdkEvents
authorAlexander Larsson <alexl@redhat.com>
Thu, 17 Nov 2011 10:59:27 +0000 (11:59 +0100)
committerAlexander Larsson <alexl@redhat.com>
Thu, 17 Nov 2011 10:59:27 +0000 (11:59 +0100)
This seems like a typo, we should obviously ref the member when
copying. Apparently nobody copied GDK_SELECTION_* events...

gdk/gdkevents.c

index eeaac2dccc000c3fa8d85f02ee18aa578cc6f8d2..7a5e4c3279e93996ee325296d9f0e74ca1eefc02 100644 (file)
@@ -580,7 +580,7 @@ gdk_event_copy (const GdkEvent *event)
     case GDK_SELECTION_REQUEST:
       new_event->selection.requestor = event->selection.requestor;
       if (new_event->selection.requestor)
-        g_object_unref (new_event->selection.requestor);
+        g_object_ref (new_event->selection.requestor);
       break;
 
     default: